/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package aicue1.typeadapter;

import java.util.Date;
import javax.xml.bind.annotation.adapters.XmlAdapter;

/**
 *
 * @author michael
 */

public class DateAdapter extends XmlAdapter<Long, Date>{
    public Long marshal(Date date) throws Exception{
        return date.getTime();
    }

    public Date unmarshal(Long datetime) throws Exception{
        return new Date(datetime);
    }
}
